﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Silverlight.Hosting;

namespace Sample.WindowsForms
{
    public partial class Form1 : Form
    {
        public SilverlightHost Host { get; set; }

        public Form1()
        {
            InitializeComponent();

            Host = new SilverlightHost();
            Host.Source = new Uri("TireStorm_v9.xap", UriKind.Relative);
            Host.Dock = DockStyle.Fill;

            Host.SilverlightError += OnError;

            Controls.Add(Host);
        }

        void OnError(object sender, SilverlightErrorEventArgs e)
        {
            MessageBox.Show(e.Error);
        }
    }
}
